package org.kotlinlang.play

open class Dog {
    open fun sayHello() {
        println("Dog say Hello")
    }
}

class Yorkshire : Dog() {
    override fun sayHello() {
        println("wif wif")
    }
}

open class Tiger(val origin: String) {
    fun sayHello() {
        println("A tiger from $origin says: grrhhh!")
    }
}

class SiberianTiger : Tiger("Siberian")

fun main() {
    val d: Dog = Yorkshire()
    d.sayHello()

    val tiger: Tiger = SiberianTiger()
    tiger.sayHello()
}